@(category:Byte = 0, year:Short = 0, lat:Long = 0, lng:Long = 0, sticky:Boolean = false, p:Option[models.Post] = None)(implicit s:dao.Session)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.21" />
  <script type="text/javascript" src="@asset("/public/js/jquery-1.5.2.min.js")"></script>
  <script type="text/javascript" src="@asset("/public/js/jquery.infieldlabel.min.js")"></script>
  <script type="text/javascript" src="@asset("/public/js/publish.js")"></script>
  <link media="screen" rel="stylesheet" type="text/css" href="@asset("public/css/minimal.css")"/>
  
</head>

<body>
  
  <p id="location-error" class="fancy-error">
    Su navegador no nos permite conocer su ubicación.<br />
    Use el mapa para crear una publicación.
    <br />
    <a href="/mapa" target="_parent">Ir al mapa</a>
  </p>
  
  <form class="infield" id="publish-form" action="/user/@if(p.isDefined){edit}else{publish}" method='post' enctype='multipart/form-data' style="display:none;">
    <p>
      <label for="publish-title">Título</label>
      <input type="text" id="publish-title" name="title" @if(p.isDefined){value="@p.get.title"} />
    </p>
    <p>
      <label for="publish-content">Texto</label>
      <textarea id="publish-content" name="content" rows="12" class="word_count">@if(p.isDefined){@p.get.content}</textarea>
    </p>
    @views.Application.html.categories(category, true)
    <p>
      <label for="publish-year">Año</label>
    
    @if(p.isDefined){
      <input type="text" id="publish-year" name="year" value="@p.get.year" />
    } else {
      <input type="text" id="publish-year" name="year" value="@if(year > 0){@year}" />
    }
    
    </p>
    
    <input type="hidden" id="publish-lat" name="lat" value="@if(p.isDefined){@p.get.location.latitude}else{@lat}" />
    <input type="hidden" id="publish-lng" name="lng" value="@if(p.isDefined){@p.get.location.longitude}else{@lng}" />  
    
    <input type="hidden" name="sticky" value="@sticky" />
    <input type="file" id="publish-file" name="attachment" />
    <p id="publish-content_count" style="display:none">0</p>
    
    <input type="submit" id="submit" value="@if(p.isDefined){Guardar}else{Publicar}" />
    
    @if(p.isDefined){
      <input type="hidden" name="pid" value="@p.get.id" />
      <a href="#" class="link-button" onclick="parent.show_post(@p.get.id)">Cancelar</a>
    }
    
  </form>
</body>

</html>
